import { request } from './request'

// 场所管理 API
const venueAPI = {
  // 查询场所列表
  list: (params) => {
    return request('/venue/pageVenueDOForPc', {
      method: 'POST',
      data: params || {}
    })
  },

  // 获取场所信息
  getInfo: (id) => {
    return request(`/venue/getById/${id}`)
  },

  // 新增场所
  save: (venueData) => {
    return request('/venue/save', {
      method: 'POST',
      data: venueData
    })
  },

  // 修改场所
  update: (venueData) => {
    return request('/venue/update', {
      method: 'POST',
      data: venueData
    })
  },

  // 批量删除场所
  removeByIds: (ids) => {
    return request('/venue/removeById', {
      method: 'POST',
      data: ids
    })
  },

  // 上传场所图片
  uploadPicture: (uploadData) => {
    return request('/venue/uploadPicture', {
      method: 'POST',
      body: uploadData
    })
  },

  // 删除场所图片
  removePicture: (deleteData) => {
    return request('/venue/removePicture', {
      method: 'POST',
      body: deleteData
    })
  },

  // 获取场所类型
  listVenueType: () => {
    return request('/venue/listVenueType')
  }
}

export { venueAPI }